package com.jdrx.sw.sewage.common.constant;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 系统常量
 */
public class Constant {
    /**
     * 状态为-1取data
     */
    public static final String ERR_MESSAGE_CODE = "-1";
    /**
     * 请求头的站点id
     */
    public static final String TRANSPARENT_STATIONID_FEILD = "X-STATIONID";
    /**
     * 请求头的用户名
     */
    public static final String TRANSPARENT_USERNAME_FEILD = "X-USERNAME";
    /**
     * 默认日期时间格式
     */
    public static final String DEFAULT_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
    /**
     * 默认日期格式
     */
    public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
    /**
     * 默认时间格式
     */
    public static final String DEFAULT_TIME_FORMAT = "HH:mm:ss";
    /**
     * 默认时间格式
     */
    public static final String YMD_TIME_FORMAT = "yyMMdd";
    /**
     * 默认时间格式
     */
    public static final String MD_TIME_FORMAT = "MMdd";
    /**
     * 默认时间格式
     */
    public static final String YMD_TIME_FORMAT_CURRMONTH = "yyyy-MM";
    /**
     * 默认时间格式
     */
    public static final String YMD_TIME_FORMAT_CURRY = "yyyy";
    /**
     * 默认日期格式
     */
    public static final String DEFAULT_DATE_FORMAT_H = "yyyy-MM-dd HH:00:00";
    /**
     * 默认日期格式
     */
    public static final String DEFAULT_DATE_FORMAT_DAY = "yyyy-MM-dd 00:00:00";
    /**
     * 默认日期格式
     */
    public static final String DEFAULT_DATE_FORMAT_HM = "yyyy-MM-dd HH:00";
    /**
     * 是否删除标志正常
     */
    public static final boolean NORMAL = false;
    /**
     * 是否是拿出标志删除
     */
    public static final boolean DELETE = true;
    /**
     * 租户ID标识
     */
    public static final String TENANT_ID = "TENANT-ID";

    /**
     * stationId
     */
    public static final String STATION_ID = "stationId";
    /**
     * 用户ID标识
     */
    public static final String UID = "X-UID";
    /**
     * 租户数据节点
     */
    public static final String DATA_NODE = "DATA-NODE";

    public static final String APPLICATION_NAME = "sw-smart-sewage-app";
    /**
     * 红色告警系统处理消息
     */
    /** 红色告警系统处理消息*/
    public static final String RED_ALARM_HANDLE_SYS_IDEA = "AI检测到红色告警";
    /**
     * 黄色色告警系统处理消息
     */
    public static final String YE_ALARM_HANDLE_SYS_IDEA = "AI检测到黄色告警";
    /**
     * 升红色告警系统处理消息
     */
    public static final String RISE_ALARM_HANDLE_SYS_IDEA = "升为红色告警";
    /**
     * 降黄色色告警系统处理消息
     */
    public static final String DROP_ALARM_HANDLE_SYS_IDEA = "降为黄色告警";
    /**
     * 责任人阅读告警系统处理消息
     */
    public static final String READ_ALARM_HANDLE_DUTY_USER_IDEA = "管理员%s已阅读";
    /**
     * 空串
     */
    public static final String EMPTY = "";
    /**
     * bim Access Token 缓存
     */
    public static final String BIM_ACCESS_TOKEN = "sewage:tenant:bim:accessToken:";
    /**
     * bim viewToken 缓存
     */
    public static final String BIM_VIEW_TOKEN = "sewage:tenant:bim:viewToken:";
    /**
     * bim viewToken 缓存
     */
    public static final String WX_ACCESS_TOKEN = "sewage:tenant:WX:accessToken:";
    /**
     * 设备批量导入站点和用户id
     */
    public static final String DEVICE_INPUT_STATIONID_USERID = "sewage:tenant:device:input:stationId_userId_";
    /**
     * 设备批量导入站点和用户id的校验数据
     */
    public static final String DEVICE_INPUT_STATIONID_USERID_CHECKDATA = "sewage:tenant:device:input:stationId_userId_checkData_";
    /**
     * 设备批量导入每3000条提交一次
     */
    public static final int BATCH_COUNT = 3000;
    /**
     * 设备编码
     */
    public static final String SEQ_SN_KEY = "DEVICE_SN_SEQUENCE";
    /**
     * 设备编码
     */
    public static final String ALARM_NUM_SN_KEY = "DEVICE_ALARM_NUM";
    /**
     * 设备编码
     */
    public static final String DEVICE_COMMAND_NUM = "DEVICE_COMMAND_NUM";
    /**
     * 资产入库
     */
    public static final String QUALITY_UN = "水质异常%s ";
    /**
     * 水质异常
     */
    public static final String DEVICE_STORAGE = "录入%s台/件";
    /**
     * 厂站失联：网络通信断开
     */
//    public static final String STATION_OUTOFCONTACT_NETWORK_CH = "失联：%s网络通信断开";
    public static final String STATION_OUTOFCONTACT_NETWORK_CH = "%s网络通信异常，编号%s网关通信断开";
    /**
     * 厂站失联：厂站欠费断开
     */
    public static final String STATION_OUTOFCONTACT_ARREARS_CH = "失联：%s欠费断开";
    /**
     * 厂站失联：关闭厂站欠费
     */
    public static final String SYS_CLOSE_STATION_OUTOFCONTACT_ARREARS_CH = "恢复正常，AI自动关闭告警";
    /**
     * 厂站失联：关闭厂站欠费
     */
    public static final String USER_CLOSE_STATION_OUTOFCONTACT_ARREARS_CH = "关闭告警";
    /**
     * 失联告警
     */
    public static final String STATION_OUTOFCONTACT_ARREAR = "失联告警";
    /**
     * 模型预测
     */
    public static final String MODEL_DATA = "下次预测还有5分钟";
    /**
     * 分析报告
     */
    public static final String MODEL_ANALYSIS_DATA = "生成分析报告";
    /**
     * 分析报告
     */
    public static final String ANALYSIS_DATA = "分析报告";
    /**
     * 当一个时间周期内结束，实际投加的药剂量没有达到预测的药剂量，给出提示：
     * 格式：“1#泵实际投加药剂量XXX，比预测值±XXX量；
     */
    public static final String AIL_CRR_JY_DATA = "%s实际投加药剂量%s，比预测值%s量";
    /**
     * 目的为阐述下个预测周期投加药剂的数量；
     * 格式：“X#泵预测XX:XX-XX:XX需要投加XXX药剂；”
     */
    public static final String AIL_YC_JY_DATA = "%s泵预测%s:00-%s:00需要投加%s药剂";
    /**
     * 字典名称
     */
    public static final String DISNAME = "disName";
    /**
     * 字典类型key
     */
    public static final String CLASSIFYKEY = "classifyKey";
    /**
     * 字典类型VALUE
     */
    public static final String VALUE = "value";
    /**
     * 字典告警类型key
     */
    public static final String ALARMCLASSIFY = "alarmClassify";
    /**
     * 字典工艺单元类型key
     */
    public static final String PROCESSUNITCLASSIFY = "pubGatrProcessUnit";
    /**字典设备类型key*/
    public static final String GATRDEVCLASSIFY = "pubGatrDev";
    /**字典点位类型key*/
    public static final String GATRDEVPOINTCLASSIFY = "pubGatrDevPoint";
    /**远程调用接口响应成功*/
    public static final String RESPONSE_SUCCESS = "0";
    /**plc 中的true*/
    public static final int TRUE = 1;
    /** plc 中的false*/
    public static final int FALSE = 0;
    /**plc 中的false*/
    public static final int MINUS_ONE = -1;
    /**
     * 字符串true
     */
    public static final String TRUE_STR = "true";
    /**
     * 字符串false
     */
    public static final String FALSE_STR = "false";
    /**
     * 已领用设备缓存
     */
    public static final String USE_DEVICE_KEY = "sewage:tenant:useDevice:stationId:";
    /**
     * 碳源累计采集数
     */
    public static final String CARBON_SOURCE_ADD_GATHER_NUM = "sewage:tenant:carbonSource_addGatherNum:";
    /**
     * 除磷累计采集数
     */
    public static final String EXCEPT_PHOSPHORUS_ADD_GATHER_NUM = "sewage:tenant:exceptPhosphorus_addGatherNum:";
    /**
     * 爆气计采集数
     */
    public static final String EXPLOSIVE_GAS_ADD_GATHER_NUM = "sewage:tenant:explosiveGas_addGatherNum:";
    /**
     * 产品部署时间
     */
    public static final String PRODUCT_DEPLOY_TIME = "sewage:tenant:product_deploy_time:";
    /**
     * 设备缓存
     */
    public static final String DEVICE_KEY = "sewage:tenant:device:";
    /**
     * MQ设备缓存
     */
    public static final String MQ_DEVICE_KEY = "sewage:tenant:mqDevice:";
    /**
     * 站点离线状态
     */
    public static final String DEVICE_STATUS_KEY = "sewage:tenant:status:";
    /**
     * 设备下发命令
     */
    public static final String COMMAND_KEY = "sewage:tenant:command:";
    /**
     * 设备下发命令
     */
    public static final String COMMAND_KEY_DATA = "sewage:tenant:command:data:";
    /**
     * 海康accessToken缓存
     */
    public static final String HK_ACCESS_TOKEN_KEY = "sewage:tenant:hk:accessToken:";
    /**
     * 进水口
     */
    public static final String JSK = "JSK";
    /**
     * 累计流量
     */
    public static final String LJLL = "LJLL";
    /**
     * 瞬时流量
     */
    public static final String SSLL = "SSLL";
    /**
     * 水质COD
     */
    public static final String COD = "COD";
    /**
     * TN
     */
    public static final String TN = "TN";
    /**
     * WD
     */
    public static final String WD = "WD";
    /**
     * 水质TP
     */
    public static final String TP = "TP";
    /**
     * 水质NH3N
     */
    public static final String NH3N = "NH3N";
    /**
     * 水质PH
     */
    public static final String PH = "PH";
    /**
     * 水质SS
     */
    public static final String SS = "SS";
    /**
     * BOD5
     */
    public static final String BOD5 = "BOD5";
    /**
     * BOD5Y
     */
    public static final String BOD5Y = "BOD5Y";
    /**
     * 水质NH3NY
     */
    public static final String NH3NY = "NH3NY";
    /**
     * 水质H2SY
     */
    public static final String H2SY = "H2SY";
    /**
     * 水质H2S
     */
    public static final String H2S = "H2S";
    /**
     * 参数设置
     */
    public static final String S = "S";
    /**
     * 一仪表
     */
    public static final String Y = "Y";
    /**
     * 参数设置
     */
    public static final String DNB = "DNB";
    /**
     * DO
     */
    public static final String DO = "DO";
    /**
     * 调节池也为
     */
    public static final String TJC_YWJ_YW_Y = "TJC_YWJ_YW_Y";
    /**
     * 累计运行时间
     */
    public static final String LJYXSJ = "LJYXSJ";
    /**
     * 字符串0
     */
    public static final String ZEROS = "0";
    /**
     * 字符串1
     */
    public static final String ONE = "1";
    /**
     * 点位命令 停止
     */
    public static final String TZ = "TZ";
    /**
     * 点位命令 开
     */
    public static final String K = "K";
    /**
     * 点位命令 关
     */
    public static final String G = "G";
    /**
     * 点位命令 手动
     */
    public static final String SD = "S";
    /**
     * 点位命令 自动
     */
    public static final String ZD = "Z";
    /**
     * 点位命令 启动
     */
    public static final String QD = "QD";
    /**
     * 点位命令 正常
     */
    public static final String ZC = "ZC";
    /**
     * 点位命令 阀开
     */
    public static final String FK = "FK";
    /**
     * 点位命令 阀关
     */
    public static final String FG = "FG";
    /**
     * 点位命令 本地
     */
    public static final String BD = "BD";
    /**
     * 点位命令 远程
     */
    public static final String YC = "YC";
    /**
     * 点位命令 正常和故障
     */
    public static final String ZG = "ZG";
    /**
     * 点位命令 故障
     */
    public static final String GZ = "GZ";
    /**
     * 工艺单元 出水渠
     */
    public static final String CSQ = "CSQ";

    /**
     * 工艺单元 碳源加药
     */
    public static final String TYJY = "TYJY";
    /**
     * 工艺单元 PAC加药
     */
    public static final String PACJY = "PACJY";
    /**
     * 故障
     */
    public static final String GZ_CH = "%s 故障";
    /**
     * 水质
     */
    public static final String QUALITY = "水质";
    /**
     * DOY
     */
    public static final String DOY = "DO仪表";
    /**
     * 调节池液位
     */
    public static final String TJCYE_CN = "调节池液位";
    /**
     * 进水瞬时流量
     */
    public static final String JSSSLL_CN = "进水瞬时流量";
    /**
     * 进水累计流量
     */
    public static final String JSLJLL_CN = "进水累计流量";
    /**
     * 进水总累计流量
     */
    public static final String JSLJLL_T_CN = "进水总累计流量";
    /**
     * 出水COD
     */
    public static final String CSCOD_CN = "出水COD";
    /**
     * 出水TN
     */
    public static final String CSTN_CN = "出水TN";
    /**
     * 出水TP
     */
    public static final String CSTP_CN = "出水TP";
    /**
     * 出水氨氮
     */
    public static final String CSAD_CN = "出水氨氮";
    /**
     * 出水PH
     */
    public static final String CSAD_PH = "出水PH";
    /**
     * 出水SS
     */
    public static final String CSAD_SS = "出水SS";
    /**
     * 出水瞬时流量
     */
    public static final String CSSSLL_CN = "出水瞬时流量";
    /**
     * 出水累计流量
     */
    public static final String CSLJLL_CN = "出水累计流量";
    /**
     * 出水累计流量
     */
    public static final String YB = "仪表";
    public static final String SB = "设备";
    /**
     * 数据清晰1小时
     */
    public static final String DATA_ANALYSIS_1HOUR = "'60 min'";
    /**
     * 数据清晰12小时
     */
    public static final String DATA_ANALYSIS_12HOUR = "'720 min'";
    /**
     * redis缓存前缀
     */
    public static final String REDIS_TENANT = "sewage:tenant:";
    /**租户用户缓存，后续拼接租户id+用户id作为键*/
    public static final String REDIS_USER = "sewage:user:";
    /**工艺单元 展示的设备*/
    public static final Map<String, String> PROC_SHOW_DEVICE = new LinkedHashMap<String, String>() {{
        put("PHY", "PH仪");
        put("SSY", "SS仪");
        put("TNY", "TN仪");
        put("TPY", "TP仪");
        put("CODY", "COD仪");
        put("NH3NY", "NH3-N仪");
        put("LLJ", "流量计");
        put("YWJ", "液位计");
        put("GZJ", "格栅机");
        put("CGZJ", "粗格栅机");
        put("XGZJ", "细格栅机");
        put("GFJ", "鼓风机");
        put("JBJ", "搅拌机");
        put("LXB", "离心泵");
        put("QSB", "潜水泵");
        put("LGB", "螺杆泵");
        put("ZSB", "柱塞泵");
        put("GMB", "隔膜泵");
        put("ZWX", "紫外线");
        put("FCXT", "反冲系统");
        put("FJXT", "风机系统");
        put("TSBXT", "提升泵系统");
        put("BZXT", "泵组系统");
        put("YTHSB", "一体化设备");
    }};
    /**控制点位转换*/
    public static final Map<String, String> D_CHANGE = new LinkedHashMap<String, String>() {{
        put("K", "KG");
        put("G", "KG");
        put("SD", "SZ");
        put("ZD", "SZ");
        put("QD", "QT");
        put("TZ", "QT");
        put("ZC", "ZG");
        put("GZ", "ZG");
        put("FK", "FKG");
        put("FG", "FKG");
        put("BD", "BY");
        put("YC", "BY");
    }};
}
